<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateArticlesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('articles', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('column_id')->default(0)->comment('所属栏目');
            $table->string('title')->comment('文章标题');
            $table->string('copy_from')->comment('文章来源 例：腾讯新闻|http://new.qq.com/omn/20180410A01VOQ00');
            $table->string('keywords')->comment('关键词');
            $table->text('description')->comment('网站描述');
            $table->longText('content')->comment('文章内容');
            $table->integer('views')->default(0)->comment('浏览量');
            $table->integer('state')->default(0)->comment('状态');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('articles');
    }
}
